package org.ucas.kgraph.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.ucas.kgraph.entity.Account;

@Repository
public interface AccountDao extends JpaRepository<Account,Long>{
	
  Account findByName(String name);

  @Query("SELECT a FROM Account a WHERE a.name = ?1 AND a.password = ?2")
  Account findByNameAndPassword(String name, String password);
}
